import { SetupCalendar, Calendar, DatePicker } from 'v-calendar';
import 'highlight.js/styles/monokai.css';
import Markdown from 'vue3-markdown-it';
import { store, key } from './store'
import 'v-calendar/dist/style.css';
import router from './router.js'
import { createApp } from 'vue'
import App from './App.vue'
import './style.css'

const app = createApp(App)
//app.config.globalProperties.$md5 = md5;
app.config.globalProperties.$serverurl = "http://127.0.0.1:80/";

app
//.use(VueAxios, axios)
//.provide("axios", app.config.globalProperties.axios)
//.use(BootstrapVue3)
.use(SetupCalendar, {})
.use(store, key)
.use(Markdown)
.use(router)
.component('DatePicker', DatePicker)
.component('Calendar', Calendar)
.mount('#app')


window.addEventListener('scroll', function(ev) {
    document.body.toggleAttribute('scroll', true)
    this.timer && clearTimeout(this.timer)
    this.timer = setTimeout(() => {
      document.body.toggleAttribute('scroll')
    }, 500)
  })